import req from '../common/network'

export default {
  // 列表
  async list (params) {
    return await req({
      method: 'GET',
      url: '/reports',
      params,
    })
  },
  // 添加
  async create (data) {
    return await req({
      method: 'POST',
      url: '/reports',
      data,
    })
  },
  // 修改
  async update (data) {
    return await req({
      method: 'PUT',
      url: `/reports/${data.id}`,
      data,
    })
  },
  // 详情
  async get (id) {
    return await req({
      method: 'GET',
      url: `/reports/${id}`,
    })
  },
}
